﻿<!--#include file="inc/const.asp"-->
<%
on error resume next

db "alter table [{pre}channel] add Display int default 1 NOT NULL",0
db "update [{pre}channel] set Display = 1",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}Config] add ConfigType int Default 0",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}Content] Drop [Order]",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}Content] add SubTitle varchar(250)",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}Content] add FormID int Default 0",0
if err then response.write err.description & "<br />" : err.clear
db "update [{pre}Content] set [FormID]=0",0
if err then response.write err.description & "<br />" : err.clear

db "update [{pre}Content] set [FormID]=0 where [FormID]=''",0
if err then response.write err.description & "<br />" : err.clear

db "Create Table [{pre}Special] ([ID] Int IDENTITY (1, 1) NOT NULL PRIMARY KEY,[SpecialName] Varchar(250),[keywords] Varchar(255),[description] text,[SpecialPhoto] Varchar(250),[DateLine] DateTime Default  {date},[Order] Int Default 0,[FileName] varchar(50),[Template] varchar(50))",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}Content] add publishTime DateTime Default {date}",0
if err then response.write err.description & "<br />" : err.clear
db "update [{pre}content] set [publishtime]='"&now()&"'",0
if err then response.write err.description & "<br />" : err.clear

db "alter table [{pre}content] add commend1 int default 0",0
db "update [{pre}content] set commend1=0",0
if err then response.write err.description & "<br />" : err.clear

db "Create Table [{pre}UserForm] ([ID] Int IDENTITY (1,1) NOT NULL PRIMARY KEY,[Name] Varchar(50),[Status] Int Default 0,[DateTime] DateTime Default {date},[Order] Int Default 0)",0
if err then response.Write err.description& "<br/>":err.clear 

db "Create Table [{pre}FormField] ([ID] Int IDENTITY (1,1) NOT NULL PRIMARY KEY,[FormID] int Default 0,[FieldTitle] Varchar(50),[FieldName] varchar(50),[FieldType] varchar(50),[DefaultValue] text,[IsMustInput] int default 0)",0
if err then response.Write err.description& "<br />":err.clear 

db "alter table [{pre}content] add commend2 int default 0",0
db "update [{pre}content] set commend2=0",0
if err then response.write err.description & "<br />" : err.clear
db "insert into [{pre}Config] ([Title],[Name],[Value],[Values],[Data],[Form],[Description],[Order],[ConfigType]) values ('标题附加字','seotitle','5u网络,5u建站,网络推广,网站建设','','text','input','用于SEO的关键字,显示在标题后面',85,3)",0
if err then response.write err.description & "<br />" : err.clear
db "update [{pre}Config] set ConfigType = 1 where ID<12",0
db "update [{pre}Config] set ConfigType = 2 where ID>11 and ID <15",0
db "update [{pre}Config] set ConfigType = 1 where ID>14 and ID <19",0
db "update [{pre}Config] set ConfigType = 2 where ID>18 and ID <21",0
db "update [{pre}Config] set ConfigType = 1 where ID=21",0
db "update [{pre}Config] set ConfigType = 3 where ID>21 and ID<25",0
db "update [{pre}Config] set ConfigType = 1 where ID>24 and ID<28",0
db "update [{pre}Config] set ConfigType = 3 where ID>27 and ID<31",0
db "update [{pre}Config] set ConfigType = 1 where ID=31",0
db "update [{pre}Config] set ConfigType = 3 where ID>31 and ID<35",0
db "update [{pre}Config] set ConfigType = 1 where ID>34",0
if err then response.write err.description & "<br />" : err.clear
response.write "如果没有报错，表示已经升级成功，请删除本文件！"

term

%>